package com.meituan.controller;

import com.meituan.pojo.resp.BaseResp;
import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
@ResponseBody
public class ExceptionController {

    @ExceptionHandler(AuthorizationException.class)
    public BaseResp authorizationException(){
        return new BaseResp().UnAuthor();
    }
}
